<?php
	class getGuildList extends ActionHandler
	{
		function handleRequest($jsonData)
		{
			$data = $jsonData['param'];
			$sql = " select b.name,  a.guildId from ".$this->tables['guild_user_profile']." a left join ".$this->tables['user_profile']." b on a.guildId = b.id where a.priority = 0";
			//
			$result = $this->db->query($sql);
			$return = array();
			$i = 0;
			while ($arr = $this->db->fetchArray($result))
			{
				$return[$i]['guildId'] = $arr['guildId'];
				$return[$i++]['guildName'] = $arr['name'];
			}
			
			return $return;
		}
	}


?>